Accusoft.PdfXpress7.ActiveX
Add Images to a PDF Page

Images can be added to a specified location on an existing PDF page, using the "AddImage" methods: AddImageFromData, AddImageFromFile, AddImageFromHandle, or AddImageFromMemory.

VB Example
Copy Code
'This code demonstrates adding images to a PDF 
On Error GoTo error
Dim pdfXpress1 As  New PdfXpress
pdfXpress1.Initialize
pdfxpress1.RaiseExceptions = True
Dim document As New PdfDocument
document. SetParentControl pdfXpress1
document.OpenDocument "C:\test.pdf",""
Dim destinationX As Double
destinationX = 18
Dim destinationY As Double
destinationY = 18
Dim destinationW As Double
destinationW = 576
Dim destinationH As Double
destinationH = 756
Dim destinationFit As pdfImageFitSettings
destinationFit = pdfImageFitSettings.PDF_ImageFitNone
document.AddImageFromFile 0, destinationX, destinationY, destinationW, destinationH, destinationFit, "C:\pdftest.bmp", 0
.
.
.
GoTo finish
error:
MsgBox Err.Description
finish:

Set document = Nothing
pdfxpress1.Terminate
Set pdfxpress1= Nothing

 

See Also

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback